package com.xf.lastmall.moudle.enums;


/**
 * @Desc: 1正常2一点万象单边3支付渠道单边4双方金额不匹配
 * @Author: yeweijian
 * @Date 2018/10/15 16:27
 */
public enum PayBillCheckResult {

    NORMAL(1, "正常"),

    MIXC_UNILATERAL(2, "一点万象单边"),

    PAY_UNILATERAL(3, "支付渠道单边"),

	AMOUNT_MISMATCH(4, "双方金额不匹配");

    private Integer value;
    private String text;

    PayBillCheckResult(Integer value, String text) {
        this.value = value;
        this.text = text;
    }

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}
	
    public static PayBillCheckResult fromValue(Integer value) {
		if (value == null) {
			return null;
		}
		for (PayBillCheckResult action : PayBillCheckResult.values()) {
			if (action.getValue().intValue() == value.intValue()) {
				return action;
			}
		}
		return null;
	}

	public static String getText(Integer value) {
		for (PayBillCheckResult action : PayBillCheckResult.values()) {
			if (action.getValue().equals(value)) {
				return action.getText();
			}
		}
		return "";
	}
    
}
